package com.news.model.http;

import com.news.base.HttpResponse;
import com.news.model.bean.Joke;

import java.util.ArrayList;
import java.util.Map;

import retrofit2.http.GET;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by Administrator on 2017/3/1 0001.
 */

public interface ApiService {
    //http://japi.juhe.cn/joke/content/list.from?key=3b2d9e044154d2bf1d847cb8d428a33d&page=2&pagesize=10&sort=asc&time=1418745237
    //http://v.juhe.cn/joke/randJoke.php?key=3b2d9e044154d2bf1d847cb8d428a33d&type=pic
    String BASE_URL = "http://japi.juhe.cn";
    String BASE_URL1 = "http://v.juhe.cn";

    @GET("joke/content/list.from")
    Observable<HttpResponse<ArrayList<Joke>>> jokeContent(@QueryMap Map<String , String> params);

    @GET("joke/img/list.from")
    Observable<HttpResponse<ArrayList<Joke>>> jokeContentAndImage(@QueryMap Map<String , String> params);

    @GET("joke/randJoke.php")
    Observable<HttpResponse<ArrayList<Joke>>> jokeImage(@QueryMap Map<String , String> params);
}
